import request from "@/axios"

export function getLotteryBg(actId) {
    let url  = 'api/lottery/act?actId='+actId
    return request.get(url)
}

export function getLotteryCount(actId) {
    let url=`api/lottery/add?actId=${actId}`
    return request.get(url)
}

export function startLottery(actId,recordId) {
    let url =`api/lottery/start?actId=${actId}&recordId=${recordId}`
    return request.get(url)
}

export function getLotteryList(page) {
    let url = `api/lottery/recordList?page=${page}&limit=10`
    return request.get(url)
}

export function getNum() {
    let url = '/api/lottery/getLotteryCount'
    return request.get(url)
}

export function getLotteryInfo() {
    let url = '/api/lottery/allLotteryInfo'
    return request.get(url)
}

export function getPresent(goodsId) {
    let url = '/api/cart/add'
    let params = {goodsId,quantity:1}
    params.Loading = true
    return request.post(url,params)
}

export function getPresentList(recordId) {
    let url = 'api/cart/lotteryList?recordId='+recordId
    return request.get(url)
}

